﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using roysland.net.designpatterns.MVVM;
using roysland.net.xcom.core.Models;

namespace roysland.net.xcom.editor.ViewModel
{
    public sealed class CraftStatViewModel : ViewModelBase
    {
        private readonly CraftStat record;

        public CraftStatViewModel(CraftStat craft)
        {
            record = craft;
            DisplayName = "Craft X";
        }

        public int NamePointer
        {
            get { return record.NamePointer; }
            set
            {
                if (value == record.NamePointer)
                    return;

                //record.NamePointer = value;

                OnPropertyChanged("NamePointer");
            }
        }

        public int Points
        {
            get { return record.Points; }
            set
            {
                if (value == record.Points)
                    return;

                //record.Points = value;

                OnPropertyChanged("Points");
            }
        }

        public int WeaponPods
        {
            get { return record.WeaponPods; }
            set
            {
                if (value == record.WeaponPods)
                    return;

                //record.WeaponPods = value;

                OnPropertyChanged("WeaponPods");
            }
        }

        public int MaximumSpeed
        {
            get { return record.MaximumSpeed; }
            set
            {
                if (value == record.MaximumSpeed)
                    return;

                //record.MaximumSpeed = value;

                OnPropertyChanged("MaximumSpeed");
            }
        }

        public int Acceleration
        {
            get { return record.Acceleration; }
            set
            {
                if (value == record.Acceleration)
                    return;

                //record.Acceleration = value;

                OnPropertyChanged("Acceleration");
            }
        }

        public int Fuel
        {
            get { return record.Fuel; }
            set
            {
                if (value == record.Fuel)
                    return;

                //record.Fuel = value;

                OnPropertyChanged("Fuel");
            }
        }

        public int Damage // Armor
        {
            get { return record.Damage; }
            set
            {
                if (value == record.Damage)
                    return;

                //record.Damage = value;

                OnPropertyChanged("Damage");
            }
        }

        public int SizeClass
        {
            get { return record.SizeClass; }
            set
            {
                if (value == record.SizeClass)
                    return;

                //record.SizeClass = value;

                OnPropertyChanged("SizeClass");
            }
        }

        public int FiringInterval // ??
        {
            get { return record.FiringInterval; }
            set
            {
                if (value == record.FiringInterval)
                    return;

                //record.FiringInterval = value;

                OnPropertyChanged("FiringInterval");
            }
        }

        public int DestroyScore // ??
        {
            get { return record.DestroyScore; }
            set
            {
                if (value == record.DestroyScore)
                    return;

                //record.DestroyScore = value;

                OnPropertyChanged("DestroyScore");
            }
        }

        public int WeaponRange
        {
            get { return record.WeaponRange; }
            set
            {
                if (value == record.WeaponRange)
                    return;

                //record.WeaponRange = value;

                OnPropertyChanged("WeaponRange");
            }
        }

        public int WeaponDamage
        {
            get { return record.WeaponDamage; }
            set
            {
                if (value == record.WeaponDamage)
                    return;

                //record.WeaponDamage = value;

                OnPropertyChanged("WeaponDamage");
            }
        }

        public int Crew
        {
            get { return record.Crew; }
            set
            {
                if (value == record.Crew)
                    return;

                //record.Crew = value;

                OnPropertyChanged("Crew");
            }
        }

        public int Hwp
        {
            get { return record.Hwp; }
            set
            {
                if (value == record.Hwp)
                    return;

                //record.Hwp = value;

                OnPropertyChanged("Hwp");
            }
        }
    }
}
